<template>
  <div>
    <mt-swipe :auto="2000">
      <mt-swipe-item v-for="(item,index) in lunBoData" :key="index">
        <img :src="item.img" :alt="item.url" />
      </mt-swipe-item>
    </mt-swipe>
    <ul class="mui-table-view mui-grid-view mui-grid-9">
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4">
        <router-link to="/home/newList">
          <img src="../image/01.jpg" alt />
          <div class="mui-media-body">新闻资讯</div>
        </router-link>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4">
        <router-link to="/home/pictureShare">
          <img src="../image/02.jpg" alt />
          <div class="mui-media-body">图片共享</div>
        </router-link>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4">
        <router-link to="/home/shopCart">
          <img src="../image/03.jpg" alt />
          <div class="mui-media-body">商品购买</div>
        </router-link>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4">
        <router-link to="/home/feedback">
          <img src="../image/04.jpg" alt />
          <div class="mui-media-body">留言反馈</div>
        </router-link>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4">
        <router-link to="/home/video">
          <img src="../image/05.jpg" alt />
          <div class="mui-media-body">视频专区</div>
        </router-link>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4">
        <router-link to="/home/contact">
          <img src="../image/06.jpg" alt />
          <div class="mui-media-body">联系我们</div>
        </router-link>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  data() {
    return {
      lunBoData: []
    };
  },
  methods: {
    getLunBo() {
      this.$http
        .get("api/getlunbo")
        .then(result => {
          console.log(result);
          if (result.body.status === 0) {
            this.lunBoData = result.body.message;
          } else {
            this.lunBoData = [];
          }
        });
    }
  },
  created() {
    this.getLunBo();
  }
};
</script>

<style lang="scss" scoped>
.mint-swipe-item img {
  width: 100%;
  height: 100%;
}
.mint-swipe {
  height: 300px;
  .mint-swipe-item {
    &:nth-child(1) {
      background-image: url("../image/01.jpg");
    }
    &:nth-child(2) {
      background-image: url("../image/06.jpg");
    }
    &:nth-child(3) {
      background-image: url("../image/07.jpg");
    }
  }
}
.mui-grid-9 {
  img {
    widows: 60px;
    height: 60px;
  }
}
</style>